/**
 * Generate time : 2011-06-27 5:55:00
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cc.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCCQualitystandardSubitem
 * 
 */
public class ZMCCQualitystandardSubitem extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdSubitemName = " "; /* 分项名称 */
	private Long fdSerialnum = new Long(0); /* 顺序号 */
	private String fdStatus = " "; /* 状态 */
	private String fdPointMethod = " "; /* 分项记分方式 */
	private Float fdPointValue = new Float(0); /* 记分率 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSubitemName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("分项名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSerialnum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("顺序号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPointMethod");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("分项记分方式");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPointValue");
		eiColumn.setType("N");
		eiColumn.setScaleLength(2);
		eiColumn.setFieldLength(5);
		eiColumn.setDescName("记分率");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCCQualitystandardSubitem() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdSubitemName - 分项名称
	 * 
	 * @return the fdSubitemName
	 */
	public String getFdSubitemName() {
		return this.fdSubitemName;
	}

	/**
	 * set the fdSubitemName - 分项名称
	 */
	public void setFdSubitemName(String fdSubitemName) {
		this.fdSubitemName = fdSubitemName;
	}

	/**
	 * get the fdSerialnum - 顺序号
	 * 
	 * @return the fdSerialnum
	 */
	public Long getFdSerialnum() {
		return this.fdSerialnum;
	}

	/**
	 * set the fdSerialnum - 顺序号
	 */
	public void setFdSerialnum(Long fdSerialnum) {
		this.fdSerialnum = fdSerialnum;
	}

	/**
	 * get the fdStatus - 状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the fdPointMethod - 分项记分方式
	 * 
	 * @return the fdPointMethod
	 */
	public String getFdPointMethod() {
		return this.fdPointMethod;
	}

	/**
	 * set the fdPointMethod - 分项记分方式
	 */
	public void setFdPointMethod(String fdPointMethod) {
		this.fdPointMethod = fdPointMethod;
	}

	/**
	 * get the fdPointValue - 记分率
	 * 
	 * @return the fdPointValue
	 */
	public Float getFdPointValue() {
		return this.fdPointValue;
	}

	/**
	 * set the fdPointValue - 记分率
	 */
	public void setFdPointValue(Float fdPointValue) {
		this.fdPointValue = fdPointValue;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdSubitemName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSubitemName")), fdSubitemName));
		setFdSerialnum(NumberUtils.toLong(StringUtils.toString(map.get("fdSerialnum")), fdSerialnum));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdPointMethod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPointMethod")), fdPointMethod));
		setFdPointValue(NumberUtils.toFloat(StringUtils.toString(map.get("fdPointValue")), fdPointValue));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdSubitemName", StringUtils.toString(fdSubitemName, eiMetadata.getMeta("fdSubitemName")));
		map.put("fdSerialnum", StringUtils.toString(fdSerialnum, eiMetadata.getMeta("fdSerialnum")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdPointMethod", StringUtils.toString(fdPointMethod, eiMetadata.getMeta("fdPointMethod")));
		map.put("fdPointValue", StringUtils.toString(fdPointValue, eiMetadata.getMeta("fdPointValue")));

		return map;

	}
}